export default {
    data() {
        return {
            data: {},
            ruleValidate: {
                sku: [{required: true, message: "产品SKU不能为空"}],
                name: [{required: true, message: "产品名称不能为空"}],
                unit: [{required: true, message: "产品单位不能为空"}],
                condition: [{required: true, message: "存储条件不能为空"}],
                validity: [{required: true, message: "产品效期管理不能为空"}],
                lockup_validity: [{required: true, type: 'integer', message: "保质期禁售天数必须填写"}]
            }
        }
    },
    methods: {
        validityChange(val) {
            if (val === '1') {
                this.data.lockup_validity = 0;
            }
        }
    }
}
